Week 16
Interface and Application Programming
Assignment
write an application that interfaces with an input &/or output device that you made, comparing as many tool options as possible.
As i designed and got the output for this device in the input week,So I need to make the application in MIT app inventor and then i have to interface my board with the application,thereby controlling my device with the application using the Bluetooth.
In my board i used an IR transmitter receiver module available in Kuwait FabLab.
Items required for interfacing:
1- Board which is needed to interface.
2-Mobile application created in MIT App inventor.
3-Android Mobile phone.
4-Bluetooth module.
Bluetooth:
Bluetooth is a wireless technology standard for exchanging data over short distances (using short-wavelength UHF radio waves in the ISM band from 2.4 to 2.485 GHz) from fixed and mobile devices, and building personal area networks (PANs). Invented by telecom vendor Ericsson in 1994, it was originally conceived as a wireless alternative to RS-232 data cables. (Wikipedia)
This week topic is so interesting in so many ways. Unfortunately I spent way too much time on Networking & Communication so I had little less time than I wanted for this week. Hopefully I would find time to get some extra cool stuff up and running. After scooping around for something I found out that I wanted to test the software Processing 3 that seems to have some kind of Arduino flavor to it.
Here I am using HC-06 module for blue toooth.
Application and Interface
•.Use and input/output device and make an interface for it.
•.Program the input/output device.
•.Program the interface.
I used the same board in the output here
The code for the board is just for turning on and Off .Which is controlled by application.
#include <SoftwareSerial.h>
SoftwareSerial mySerial(6, 255); // RX, TX
#define LED 3
char c;
void setup() {
// Open serial communications and wait for port to open:
mySerial.begin(9600);
pinMode(LED, OUTPUT);
digitalWrite(LED, LOW);
}
void loop() { // run over
and over while (mySerial.available() <= 0);
c = mySerial.read()
; if (c == '1') {
digitalWrite(LED, HIGH);
delay(500);
}
else
digitalWrite(LED, LOW);
}
I used the MIT app inventor to create an application which can be used to control my board.
The best thing in this is just dragging and dropping the blocks which we want to use. We can put different conditions inside the blocks.
Blue tooth blocks are done to pick the bluetooth and there by I can connect my device to the android.
After completing the design.I can download the .apk file which can be installed on any android device.
Video:
File:
Aia file of App inventor